import request from '@/utils/request'

// 查询网格列表
export function listGrids(query) {
  return request({
    url: '/yiluzhilian/grids/list',
    method: 'get',
    params: query
  })
}

// 查询网格详细
export function getGrids(id) {
  return request({
    url: '/yiluzhilian/grids/' + id,
    method: 'get'
  })
}

// 新增网格
export function addGrids(data) {
  return request({
    url: '/yiluzhilian/grids',
    method: 'post',
    data: data
  })
}

// 修改网格
export function updateGrids(data) {
  return request({
    url: '/yiluzhilian/grids',
    method: 'put',
    data: data
  })
}

// 删除网格
export function delGrids(id) {
  return request({
    url: '/yiluzhilian/grids/' + id,
    method: 'delete'
  })
}
// 检查是否可以删除
export function checkIsExist(id) {
  return request({
    url: '/yiluzhilian/fingerprint/checkByGridId/' + id,
    method: 'get'
  })
}
